package storage;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;

import org.junit.Test;

public class CareTakerTest {

	@Test
	public void testAddRemoveMemento() {
		Memento memento = mock(CanvasMemento.class);
		CareTaker careTaker = new CareTakerImpl();
		
		careTaker.add(memento);
		assertEquals(memento, careTaker.remove());
	}
	
	@Test
	public void testReturnsNullCanvasMemento() {
		CareTaker careTaker = new CareTakerImpl();
		Memento memento = new NullCanvasMemento();
		
		Memento testMemento = careTaker.remove();
		assertTrue(memento.equals(testMemento));
	}
}
